package com.uduemc.biso.master.backend.service;

import java.io.IOException;
import java.util.List;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.uduemc.biso.core.extities.center.SysServer;

public interface ServermanageService {

	/**
	 * 通过 type 以及 status 获取 SysServer 数据列表，如果 status 为 -1 则不进行查询条件过滤
	 * 
	 * @param type
	 * @param status
	 * @return
	 * @throws IOException
	 * @throws JsonProcessingException
	 * @throws JsonMappingException
	 * @throws JsonParseException
	 */
	public List<SysServer> getServerByTypeStatus(int type, short status)
			throws JsonParseException, JsonMappingException, JsonProcessingException, IOException;

	/**
	 * 新增 server 数据
	 * 
	 * @param server
	 * @return
	 * @throws IOException
	 * @throws JsonProcessingException
	 * @throws JsonMappingException
	 * @throws JsonParseException
	 */
	public SysServer insert(SysServer server)
			throws JsonParseException, JsonMappingException, JsonProcessingException, IOException;

	/**
	 * 更新已有的 server 数据
	 * 
	 * @param server
	 * @return
	 * @throws JsonParseException
	 * @throws JsonMappingException
	 * @throws JsonProcessingException
	 * @throws IOException
	 */
	public SysServer update(SysServer server)
			throws JsonParseException, JsonMappingException, JsonProcessingException, IOException;

	/**
	 * 通过 id 获取 server 数据
	 * 
	 * @param server
	 * @return
	 * @throws IOException
	 * @throws JsonProcessingException
	 * @throws JsonMappingException
	 * @throws JsonParseException
	 */
	public SysServer getById(long id)
			throws JsonParseException, JsonMappingException, JsonProcessingException, IOException;

	/**
	 * 通过 id 对 server 数据进行删除
	 * 
	 * @param id
	 * @return
	 * @throws JsonParseException
	 * @throws JsonMappingException
	 * @throws JsonProcessingException
	 * @throws IOException
	 */
	public SysServer deleteById(long id)
			throws JsonParseException, JsonMappingException, JsonProcessingException, IOException;
}
